package com.arron.classLoadAndInnit.classloader;

import java.lang.reflect.Method;

public class TestClassLoader {

    public static void main(String[] args) {


        DiskClassLoader diskClassLoader = new DiskClassLoader("D:\\lib");

        try {
            Class<?> aClass = diskClassLoader.loadClass("com.arron.test.Test");

            if (aClass != null) {


                Object o = aClass.newInstance();
                Method sayHello = aClass.getDeclaredMethod("say", null);

                sayHello.invoke(o,null);

            }
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

}

